import Vue from 'vue'
const { $http, $api } = Vue.prototype
import BetterUtilTools from "better-util-tools"
const _ = new BetterUtilTools()
export default {
    getOpenId(data = {}) {
        return $http({
            url: $api.getOpenid + `?${_.queryString(data)}`,
            //method:'post',
            header: {
                loading: {
                    title: '获取openId',
                    show: false
                }
            },
            data,
        })
    },
    getPhone(data = {}) {
        return $http({
            url: $api.getPhone,
            header: {
                loading: {
                    title: '获取手机号',
                    show: false
                },
                'content-type': 'application/x-www-form-urlencoded'
            },
            data,
        })
    },
    minRegCustomer(data = {}) {
        return $http({
            url: $api.minRegCustomer + `?${_.queryString(data)}`,
            header: {
                loading: {
                    title: '一键登录中...',
                    show: false
                },
            },
            data,
        })
    }
}
